\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{math book}[2020/06/07 math book class]

\RequirePackage{xkeyval} %kvoptions
\newif\ifprint
\DeclareOptionX{print}{\printtrue}
\DeclareOptionX*{\PassOptionsToClass{\CurrentOption}{book}}
\ProcessOptionsX*\relax
% 为了 \cleardoublepage 起效
\LoadClass{book}

\RequirePackage{geometry}
%\geometry{paperheight=260mm,paperwidth=185mm,margin=2cm}% 16K打印
\geometry{b5paper,margin=2cm}

\newif\ifbook\booktrue
\input{common.sty}


\counterwithout{equation}{section}
\counterwithin*{equation}{section}



\titleformat{\chapter}[hang]{\centering\LARGE\bfseries\sffamily}{第{\zhnumber{\thechapter}}章}{1em}{}
\titlespacing{\chapter}{0pt}{0em}{3em}
\if@twoside
    \def\chaptermark#1{%
      \markboth {\MakeUppercase{%
        \ifnum \c@secnumdepth >\m@ne
          \if@mainmatter
            第 \thechapter 章. \ %
          \fi
        \fi
        #1}}{}}%
\else
    \def\chaptermark#1{%
      \markright {\MakeUppercase{%
        \ifnum \c@secnumdepth >\m@ne
          \if@mainmatter
            第 \thechapter 章. \ %
          \fi
        \fi
        #1}}}
\fi



\addbibresource{./inputs/main.bib}


